<?php
/**
 * Created by PhpStorm.
 * User: Dave
 * Date: 2018/8/24
 * Time: 11:20
 */

use Biz\service\activity\MealInfo as sMealInfo;
use Biz\tools\GoodsExposureLog;

/**
 * @deprecated
 */
class MealInfoAction extends ActionPlugin
{
    const USER_LEVEL = self::LEVEL_NOTHING;

    public function main()
    {
        $mealId = $this->getRequest()->getQuery('meal_id');
        $type = $this->getRequest()->getQuery('type');

        if(!$mealId || is_null($type)) {
            throw new \Exception('请求参数异常');
        }

        $result = sMealInfo::mealInfoByMealId($mealId, $type);
        $this->setSuccess($result);
        GoodsExposureLog::addLog($this->getRequest(), $result,$mealId);
    }
}